Added new command version. Query the server for client's read-only status. - #57
Added new command version. Query the server for client's read-only status.#57EricPei20 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
I think that it might be better to have the read_only as a getter/setter.
@property
def read_only(self):
command = self._addSingleCommand(self.GET_CLIENT_READ_ONLY, None)
response = self._sendCommand(command)
if response != False:
read_only = self.__getParameters(response.acknowledge[0])[0]
else:
read_only=None
return read_only
@read_only.setter
def read_only(self, read_only):
command = self._addSingleCommand(self.SET_CLIENT_READ_ONLY_DEPRECATED, None, [read_only])
response = self._sendCommand(command)So then you could have client.read_only=False etc...
Right now the problem is that you can do client.read_only=True and the value will change but nothing will actually change... There are lots of things like if the set fails for some reason the value will not actually update.
|
Also if you want the pre-commit test to pass that just requires That installs the pre-commit hook to the repo so it will run a code formatting check/ style update every time that code is committed. Just something that helps to keep things easier to maintain. |
|
I guess we don't need to make the read-only client to have option set/get the read-only? I don't think this is a real use case that user need and our server does not support this currently. And if user need to have more read-write client, they need to set the attribute MaxReadWriteClients in server.xml so Server allow to have another read-write client connect. And server created a different port for Read-only client, so port will decide the client is read-only or read-write which is much easier to implement in our code.
|
No description provided.